<template>
	<v-md-editor v-model="valueHtml" height="400px"></v-md-editor>
</template>

<script setup lang="ts">
const props = defineProps({
	modelValue: {
		type: String,
		required: true,
	},
});
const valueHtml = ref(props.modelValue);

// emit 事件
const emit = defineEmits(['update:modelValue']);
// valueHtml 值发生变化时 触发emit事件 并将值赋值给vmodle
watch(valueHtml, (val) => {
	emit('update:modelValue', val);
});
</script>

<style scoped></style>
